#ifndef __EXPORT__
#define __EXPORT__

#include "IKernel.h"
#include "BussinessOperation.h"
#include "ProcessMessage.h"
#include "DisposeTask.h"

#ifdef __cplusplus
extern "C"
{
    __declspec(dllexport) bool __cdecl  AddInstance(IKernel * pvdKernel);
#endif

#ifdef __cplusplus
}
#endif

IKernel * glbPtrKernel;


__declspec(dllexport) bool __cdecl AddInstance(IKernel * ptrKernel)
{
    bool bRetVal = false;
    try
    {
		glbPtrKernel = ptrKernel;
        ptrKernel->AddInstance(CBussinessOperation::Instance());
        ptrKernel->AddInstance(CGT_000001::Instance());
		ptrKernel->AddInstance(CGT_000003::Instance());
        ptrKernel->AddInstance(CGT_000004::Instance());
        ptrKernel->AddInstance(CGT_000005::Instance());
        ptrKernel->AddInstance(CGT_000006::Instance());
        ptrKernel->AddInstance(CGT_000007::Instance());
        ptrKernel->AddInstance(CGT_000008::Instance());
		ptrKernel->AddInstance(CGT_000009::Instance());
		ptrKernel->AddInstance(CGT_000010::Instance());
		ptrKernel->AddInstance(CDisposeTask::Instance());
		ptrKernel->AddInstance(CDispTaskMan::Instance());
		ptrKernel->AddInstance(CMaLink::Instance());
		ptrKernel->AddInstance(CRunReqTask::Instance());

#ifdef IS_MA   //-DIS_MA 
		ptrKernel->AddInstance(CDisposeMaTask::Instance());
#endif // MA
		
    }
    catch (...)
    {
        goto __end;
    }
    bRetVal = true;
__end:
    return bRetVal;
}

#endif//__EXPORT__